# -*- coding: utf-8 -*-
#
# File: joboffer.py
#
# Copyright (c) 2008 by ['JC Brand']
# Generator: ArchGenXML Version 2.0
#            http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#

__author__ = """JC Brand <jc@upfrontsystems.co.za>"""
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from zope.interface import implements
import interfaces

from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.mycrew.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema = Schema((

    StringField(
        name='company',
        widget=StringField._properties['widget'](
            label='Company',
            label_msgid='mycrew_label_company',
            i18n_domain='mycrew',
        ),
        required=True,
        searchable=True,
    ),
    StringField(
        name='industry',
        widget=SelectionWidget(
            label='Industry',
            label_msgid='mycrew_label_industry',
            i18n_domain='mycrew',
        ),
        required=True,
        vocabulary=JOBS_VOCABULARY,
    ),
    TextField(
        name='location',
        widget=TextAreaWidget(
            label='Location',
            label_msgid='mycrew_label_location',
            i18n_domain='mycrew',
        ),
        required=True,
    ),
    StringField(
        name='monthlySalary',
        widget=StringField._properties['widget'](
            label='Monthlysalary',
            label_msgid='mycrew_label_monthlySalary',
            i18n_domain='mycrew',
        ),
    ),
    TextField(
        name='benefits',
        widget=TextAreaWidget(
            label='Benefits',
            label_msgid='mycrew_label_benefits',
            i18n_domain='mycrew',
        ),
    ),
    ImageField(
        name='picture',
        widget=ImageField._properties['widget'](
            label='Picture',
            label_msgid='mycrew_label_picture',
            i18n_domain='mycrew',
        ),
        storage=AttributeStorage(),
    ),
    FileField(
        name='document',
        widget=FileField._properties['widget'](
            label='Document',
            label_msgid='mycrew_label_document',
            i18n_domain='mycrew',
        ),
        storage=AttributeStorage(),
    ),
    DateTimeField(
        name='startDate',
        widget=DateTimeField._properties['widget'](
            show_hm=False,
            label='Startdate',
            label_msgid='mycrew_label_startDate',
            i18n_domain='mycrew',
        ),
    ),
),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

JobOffer_schema = BaseFolderSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
JobOffer_schema.searchable = True
##/code-section after-schema

class JobOffer(BaseFolder, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()
    implements(interfaces.IJobOffer)

    meta_type = 'JobOffer'
    _at_rename_after_creation = True

    schema = JobOffer_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header

    # Methods


registerType(JobOffer, PROJECTNAME)
# end of class JobOffer

##code-section module-footer #fill in your manual code here
##/code-section module-footer



